/**
 * 图片显示模态框
 * Created by zhaijg.
 */
'use strict';
angular.module('app')
    .factory('imgModalServices', ['$modal', function ($modal) {
    return {
        showImg: function (title,imgurl) {
            var modalInstance = $modal.open({
                templateUrl: 'tpl/modal/imgModal.html',
                controller: 'imgMessageCtrl',
                size: 'lg',
                resolve: {
                    title: function () {
                        return title;
                    },
                    info: function () {
                        return imgurl;
                    }
                }
            });
            //操作返回
            return modalInstance.result;
        }
    };
}]);
/**
 * 图片模态框控制器
 * Created by zhaijg.
 */
'use strict';
app.controller('imgMessageCtrl', ['$scope', '$modalInstance', 'title', 'info',
    function ($scope, $modalInstance, title, info) {
        $scope.message_title = title;
        $scope.imgUrl = info;
        //点确认按钮关闭
        $scope.ok = function () {
            $modalInstance.close();
        };
        //取消按钮
        $scope.cancelModal = function () {
            $modalInstance.dismiss('cancel');
        };
    }]);